package org.zht.dormpro.pub.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

public class Enums {
    @AllArgsConstructor
    public enum LoginStatus{
        LOGIN_SUCCESS(0,"登录成功"),
        LOGIN_FAILER(1,"用户名或密码错误"),
        LOGIN_FORBIDDEN(2,"账户被锁定\n请联系管理员处理!");
        @Getter @Setter
        private int status;
        @Getter @Setter
        private String desc;
    }

    //role-permission表判断要操作的是权限还是角色
    public enum MRStatus{
        MENU,ROLE
    }
    //role-user表判断要操作的是权限还是角色
    public enum URStatus{
        USER,ROLE
    }
    @AllArgsConstructor
    public enum ActionStatus {
        NORMAL_RETURNED(1000, "OK"),
        RESPONSE_ERROR(1001, "Response Error"),
        PARAMAS_ERROR(1002, "Parameters Error"),
        DATABASE_ERROR(1004, "Database Error"),
        NOT_LOGIN(1005, "NOT Login"),
        FORBIDDEN(1006, "Access Forbidden"),
        UNKNOWN(1007, "Unknow Error"),
        SERVER_ERROR(1008, "Server Error"),
        DATA_ERROR(1012, "DATA ERROR"),
        REQUEST_METHOD_ERROR(1013, "REQUEST_METHOD_ERROR");
        @Getter @Setter
        int code = -1;
        @Getter @Setter
        String desc = null;
    }
}
